Method and device for controlling the motion of one or more collaborative robots

ABSTRACT

A method for controlling the motion of one or more collaborative robots is described, the collaborative robots being mounted on a fixed or movable base, equipped with one or more terminal members, and with a motion controller, the method including the following iterative steps: —determining the position coordinates of the robots, and the position coordinates of one or more human operators collaborating with the robot; —determining a set of productivity indices associated with relative directions of motion of the terminal member of the robot, the productivity indices being indicative of the speed at which the robot can move in each of the directions without having to slow down or stop because of the presence of the operator; —supplying the controller of the robot with the data of the set of productivity indices associated with the relative directions of motion of the terminal member of the robot, so that the controller can determine the directions of motion of the terminal member of the robot based on the higher values of the productivity index.

BACKGROUND OF THE INVENTION Field of Application of the Invention

The present invention refers to the field of robotics and more precisely to collaborative robotics, and concerns a method and device for controlling the motion of one or more collaborative robots.

State of the Art

The invention applies in the framework of industrial collaborative robotics. As known, the term collaborative robot means an industrial manipulator that can be put in operation without the use of protective barriers (physical, optical, etc.) to protect the human operator who could potentially come into contact with the robot.

Until the recent past, industrial robotics provided for the rigid segregation of robots in protected environments by means of physical infrastructures (railings or optical barriers).

Today there is increasing awareness of the advantages that can be obtained by direct collaboration between man and robot, obtained through so-called collaborative robotics, by means of which it is possible to share the spaces between man and robot, and to a certain extent also to make them collaborate in performing sequences of operations.

The robot thus becomes a “workmate” of man.

Thus, problems arise in terms of ergonomics, but particularly physical safety for the people who could potentially come into contact with said robot, due to the possibility of absence of protective barriers, so that the operator and the various elements of the robot and of its terminal member can be very close to one another, sometimes even coming into direct contact.

For safety reasons, so-called “collaborative” robots must satisfy a certain number of standards and technical specifications. For example, standard UNI EN ISO 10218 (July 2011), in its two parts, defines the safety requirements for collaborative robots and the corresponding terminal members. Specifically, four man-robot collaboration modes are defined: hand-over window, interface window, inspection and collaborative workspace. Whereas the first suggest the presence of areas dedicated to interaction and their clear definition, in the others there is the possibility of operating collaboratively and continuously and not simply sporadically. The safety requirement that they share provides for the speed of the robot being controlled and reduced as a function of the minimum safety distance with respect to the operator. This situation creates clear problems of limitation of productivity.

Recently a technical specification ISO TS/15066 has been issued that provides for the possibility for the robot to continue carrying out the processing, even in situations of extreme closeness to the operator, provided that the forces involved and the possible energy transferred during an accidental collision are kept below certain thresholds, still under debate, but certainly less than the pain threshold.

However, there is a reduction of the operativity of robots, including stopping, to ensure human safety, which causes significant industrial problems in terms of productivity and efficiency of the robots.

An example of a system for controlling a collaborative robot that suffers from the problems outlined above is described in patent application WO2014048444 A1, in which said control system operates in a context oriented towards the safety and comfort of the operator rather than the productivity of the robot or of the system consisting of the robot and the human operator.

SUMMARY OF THE INVENTION

The object of the present invention is a method and device for controlling the motion of one or more collaborative robots adapted for overcoming the aforementioned drawbacks.

The idea forming the basis of the present invention concerns the definition and the corresponding calculation of directions of motion for the terminal member (end-effector) of one or more industrial robots such as to optimize productivity, based on predetermined safety conditions.

Once this information on the directions of motion of optimal productivity is known, it is possible for the robot, in the case of the presence of obstacles to its pre-programmed motion, to choose alternative directions to the pre-programmed one along which to continue its motion, thus maintaining its productivity, and subordinately, slowing down or even stopping when none of the possible alternatives is such as to allow the robot to continue its task.

The present invention allows the optimization of any one of the following productivity factors of the robot, including their combination: speed or execution time of the tasks (they are dual: optimizing the speed also means optimizing the time and vice-versa), industrial profitability of the tasks (priority is given to the most profitable tasks among those that can be performed), energy efficiency. Hereinafter, only as an example, reference will be made to the optimization of speed as a productivity factor.

An object of the present invention is a method for controlling the motion of one or more collaborative robots, said one or more collaborative robots being mounted on a fixed or movable base, equipped with one or more terminal members, and with a controller of said motion, characterized in that it comprises the following iterative steps:

-   -   determining the position coordinates of each one of said one or         more collaborative robots and the position coordinates of one or         more human operators collaborating with said one or more         collaborative robots;     -   determining a set of productivity indices associated with         relative directions of motion of said one or more terminal         members of said one or more collaborative robots, said         productivity indices being indicative of the speed at which said         one or more collaborative robots can move in each one of said         directions without having to slow down or stop because of the         presence di said one or more human operators;     -   supplying to said motion controller the data of said set of         productivity indices associated with said respective directions         of motion of said one or more terminal members, so that said         controller can determine the directions of motion of said one or         more terminal members based on the higher values of said         productivity indices.

Preferably said method for controlling the motion of one or more collaborative robots comprises a step in which said motion controller, based on said data of set of productivity indices associated with said relative directions of motion of said one or more terminal members, decides to take one of the following actions:

-   -   executing a direction of motion or path which is alternative to         a pre-programmed direction;     -   executing a new path with an alternative final position,         possibly not known a priori, which is different from a         pre-programmed final position;     -   slowing down the motion of the robot.     -   stopping the motion of the robot.

Another object of the present invention is a device for carrying out the method.

A particular object of the present invention is a method and device for controlling the motion of one or more collaborative robots, as better described in the claims, which form an integral part of the present description.

BRIEF DESCRIPTION OF THE FIGURES

Further purposes and advantages of the present invention will become clearer from the following detailed description of an embodiment thereof (and of variants thereof), and with reference to the attached drawings given purely for explaining and not limiting purposes, in which:

FIG. 1 shows a rigid rod to represent the generic link (see paragraph 3.6 in standard ISO 8373:2012) of the robot and a pointed obstacle;

FIG. 2 extends what is shown in FIG. 1 in the case of a generic, not pointed obstacle;

FIG. 3 indicates a flow diagram of the program that implements a part of the method object of the present invention;

FIG. 4 shows, as an example, a possible application scenario consisting of a robot, an operator, and a device that monitors the relative position of the robot and of the operator that carries out all of the instructions necessary to implement the method object of the present invention;

FIGS. 5 and 6 show two possible modes of use of the result of the method object of the present patent;

FIG. 7 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device according to FIG. 4 based on the present invention, in the case of execution of an alternative path to the pre-programmed one;

FIG. 8 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device according to FIG. 4 based on the present invention, in the case of execution of a new path with alternative final position, possibly not known a priori, which is different from the pre-programmed final position.

The same reference numerals and letters in the figures identify the same elements or components.

DETAILED DESCRIPTION OF EMBODIMENTS

The system object of the invention applies to a collaborative robotics station that is made up of one or more industrial collaborative robots with series kinematics (i.e., a robot the links of which do not form closed kinematic chains), including the relative control system(s), which human operators are permitted to approach, so as to satisfy the aforementioned current safety standards.

Hereinafter, consideration will be given to the text of standard ISO 8373:2012 integrated entirely for reference in the present description.

The system is able to determine the presence and the position of one or more human operators, to estimate the time evolution of the position of the operator, and to interface with the control system of the robot(s), so as to:

-   -   define directions of motion for the terminal member of said one         or more collaborative robots such as to maximize productivity,         preserving safety conditions;     -   offer the possibility of said one or more collaborative robots         selecting alternative directions along which to continue its         movement, thus maintaining its productivity, and subordinately,         slow down till stopping when none of the aforementioned         directions is such as to allow the robot to continue its task.

The method object of the invention is based on the following main characteristics:

-   -   (1) based on the position of the robot(s), mounted on fixed or         mobile bases, and of the operator(s) and possibly of the         prediction of their future position, it is capable, for each         robot, of associating a determined direction of motion of the         terminal member with a productivity index that indicates how         quickly (or effectively if the productivity is not associated         with the speed, but rather with the profitability or the         efficiency of the tasks) the robot can proceed in a given         direction without having to slow down or stop because of the         presence of an operator;     -   (2) it determines the main directions of motion of each         manipulator, organized in a decreasing manner as a function of a         productivity index;     -   (3) it allows interfacing with the controller of the robot(s)         for the purpose of the implementation of said functionality;     -   (4) it gives the robot(s) with which it communicates the         possibility of modifying its path along the directions defined,         without the need for these modifications to already be present         and/or known a priori by the controller of the same robot(s);     -   (5) it allows wireless interfacing with WiFi interface network         for communication with other devices (for example tablets,         smartphones, etc.) for the configuration and/or the remote         monitoring of the activity of the device itself and of the         robot(s).

Therefore, the method for controlling the motion of one or more collaborative robots of the present invention substantially provides for the following iterative steps:

-   -   determining the position coordinates of each collaborative         robot, and the position coordinates of one or more human         operators collaborating with the collaborative robots;     -   determining a set of productivity indices associated with         relative directions of motion of the terminal members of the         collaborative robots: the productivity indices are values         proportional to the maximum speed at which the collaborative         robots can move in each one of the directions without having to         slow down or stop because of the presence of the human         operators;     -   supplying to the motion controller the data of the set of         productivity indices associated with the relative directions of         motion of the terminal members, so that the controller can         determine the directions of motion of the terminal members based         on the higher values of the productivity indices.

Hereinafter, a brief summary of the closest prior art to the object of the present invention is given, as described in the publication: M. Ragaglia, A.M. Zanchettin, P. Rocco, “Safety-aware trajectory scaling for human-robot collaboration with prediction of human occupancy”, International Conference on Advanced Robotics (ICAR), 2015, pages 85-90. Said publication is considered integrated entirely in the present description.

The safety standards in man-robot interaction impose that at all times it is necessary to satisfy a relationship that can be generically expressed as: V·T _(s)≤max(0,S−Δ)  (1)

where V is the speed of the robot, T_(s) is the stop time (i.e., the time necessary for the motion of the robot to come to a complete stop), S is the relative distance between robot and man, □ is a safety parameter.

Let us consider a generic element (link) of the kinematic chain that constitutes the industrial robot, and on such a link, a generic point of coordinates r_(s) with respect to a spatial reference system 12 (see FIG. 1).

Using ν_(s) to represent the speed of the aforementioned point and r_(obst) to represent the position of an obstacle measured in the same reference system in which the position r_(s) is measured, the inequality (1) relative to the single point can be expressed as:

$\begin{matrix} {{v_{s}^{T}\frac{r_{obst} - r_{s}}{{r_{obst} - r_{s}}}T_{s}} \leq {\max\left( {0,{{{r_{obst} - r_{s}}} - \Delta}} \right)}} & (2) \end{matrix}$

where ν_(s) ^(T) is the transposed matrix of the vector ν_(s), whereas ∥r_(obst)−r_(s)∥ is the Euclidean norm of the vector r_(obst)−r_(s).

The formula (2) can equivalently be expressed as: ν_(s) ^(T)(r _(obst) −r _(s))T _(s)≤max(0,∥r _(obst) −r _(s)∥² −Δ∥r _(obst) −r _(s)|)  (3)

Position r_(s) and speed ν_(s) of the generic point on the link can be expressed as a function of the positions and of the speeds of the extreme points (r_(a) and r_(b), ν_(a) and ν_(b) respectively) as follows: r _(s) =r _(a) +s(r _(b) −r _(a)) ν_(s)=ν_(a) +s(ν_(b)−ν_(a))  (4) with s∈[0, 1]. Processing the previous relationships, gives: α+βs≤g(s),∀s∈[0,1]  (5) where: α=T _(s)ν_(a) ^(T)(r _(obst) −r _(a)) β=T _(s)(ν_(b)−ν_(a))^(T)(r _(obst) −r _(a))−T _(s)ν_(a) ^(T)(r _(bt) −r _(a)) g(s)=[max(0,∥r _(obst) −r _(s)∥−Δ)]²  (6)

The left member of the relationship (5) is a linear function in s: this means that sufficient safety conditions are obtained by evaluating (5) at the ends of the rod:

$\begin{matrix} {{\alpha \leq {\min\limits_{s}\;{g(s)}}}{{\alpha + \beta} \leq {\min\limits_{s}\;{g(s)}}}} & (7) \end{matrix}$ where exchanging the operations of min and max at the right member, gives:

$\begin{matrix} {{\min\limits_{s}\;{g(s)}} = \left\lbrack {\max\left( {0,{{\min\limits_{s}{{r_{obst} - r_{s}}}} - \Delta}} \right)} \right\rbrack^{2}} & (8) \end{matrix}$

The term min_(s)∥r_(obst)−r_(s)∥−Δ represents, if positive, the distance between a sphere of radius Δ centered in the point r_(obst) and the rod ends r_(a) and r_(b).

Combining (6) and (7) gives:

$\begin{matrix} {{\alpha = {{{T_{s}\left( {r_{obst} - r_{a}} \right)}^{T}v_{a}} \leq {\min\limits_{s}\;{g(s)}}}}{{\alpha + \beta} = {{{{T_{s}\left( {r_{obst} - r_{a}} \right)}^{T}v_{b}} - {{T_{s}\left( {r_{b} - r_{a}} \right)}^{T}v_{a}}} \leq {\min\limits_{s}\;{g(s)}}}}} & (9) \end{matrix}$

Let us now introduce the vector {dot over (q)} that represents the joint speeds of the manipulator: these are the time derivatives of the joint coordinates q, angular positions or linear displacements (depending on whether the joint is rotoidal or prismatic) that express the relative position of one link with respect to the previous one. Using n to indicate the number of links (and joints) of the robotic manipulator, q and {dot over (q)} are both vectors of dimensions n.

It is possible to link the linear speed ν_(a) of the first end of the link to the joint speeds {dot over (q)} by means of a matrix, called Jacobian matrix, dependent on the joint coordinates q. Analogously for the speed ν_(b) of the second end: ν_(a) =J _(a)(q){dot over (q)} ν_(b) =J _(b)(q){dot over (q)}  (10)

The Jacobian matrices J_(a) and J_(b) both have dimension (3×n).

Numbering the n links of the robotic manipulator with the index i (i=1, . . . , n) and combining the relationships (9) and (10), the criterion of minimum distance of the obstacle in position r_(obst) relative to the link i can be expressed in the following form:

$\begin{matrix} {{{E_{i}\left( {r_{obst},q} \right)}\overset{.}{q}} \leq {f_{i}\left( {r_{obst},q} \right)}} & (11) \\ {{where}\text{:}} & \; \\ {{E_{i}\left( {r_{obst},q} \right)} = \begin{bmatrix} {\left( {r_{obst} - r_{ai}} \right)^{T}J_{ai}} \\ {{\left( {r_{obst} - r_{ai}} \right)^{T}J_{bi}} - {{T_{s}\left( {r_{bi} - r_{ai}} \right)}^{T}J_{ai}}} \end{bmatrix}} & (12) \\ {{f_{i}\left( {r_{obst},q} \right)} = {\frac{1}{T_{s}}{\min\limits_{s}\;{{g_{i}(s)}\begin{bmatrix} 1 \\ 1 \end{bmatrix}}}}} & (13) \end{matrix}$ where r_(ai) and r_(bi) are the coordinates of the end points of the link i, J_(ai) and J_(bi) are the Jacobian matrices of the speeds of the aforementioned points, whereas:

$\begin{matrix} {{\min\limits_{s}{g_{i}(s)}} = \left\lbrack {\max\left( {0,{{\min\limits_{s}{{r_{obst} - r_{si}}}} - \Delta}} \right)} \right\rbrack^{2}} & (14) \end{matrix}$

r_(si) is the vector of the coordinates of the generic point along the link i.

The matrix E_(i) has dimensions (2×n) whereas the vector f_(i) has two components. The dependence of both magnitudes on the position r_(obst) of the obstacle is a direct consequence of their definition, whereas the dependence on the vector of the joint coordinates q derives from the fact that the positions of the ends r_(ai) and r_(bi) and of the generic point r_(si) depend on such joint coordinates.

Let us now consider an obstacle consisting of a generic object O represented by a convex (polytopic) solid, like in FIG. 2.

In this case the condition (11) should be conceptually expressed for all of the infinite points belonging to the object. A sufficient condition so that the relationship is valid for every point is that the following relationship is satisfied:

$\begin{matrix} {{{{E_{i}\left( {r_{obst},q} \right)}\overset{.}{q}} \leq {\frac{1}{T_{s}}{{d_{i}\left( {\mathcal{O},q} \right)}\begin{bmatrix} 1 \\ 1 \end{bmatrix}}}},{\forall{r_{obst} \in \mathcal{O}}}} & (15) \end{matrix}$

where d_(i)(O, q) is the minimum distance from the link i to the obstacle O, able to be calculated with one of the algorithms available in the literature (for example the GJK algorithm).

The relationship (15) can then be calculated (by linearity given the convexity of the object) only in the vertices of the obstacle:

$\begin{matrix} {{{{E_{i}\left( {r_{verj},q} \right)}\overset{.}{q}} \leq {\frac{1}{T_{s}}{{d_{i}\left( {\mathcal{O},q} \right)}\begin{bmatrix} 1 \\ 1 \end{bmatrix}}}},{\forall{{j\text{:}\mspace{14mu} r_{verj}} \in {{vert}(\mathcal{O})}}}} & (16) \end{matrix}$

Summarizing, for every link i of the robot and for all of the η points at the vertices of all of the obstacles it is necessary for relationship (16) to be satisfied.

Let us thus introduce the vector p that encompasses the coordinates p_(j) of all of the points at the vertices of the obstacles: p will thus have a number of components equal to 3*η.

Let us then define the matrix, of dimensions (2*n*η×n):

$\begin{matrix} {{E\left( {p,q} \right)} = \begin{bmatrix} {E_{1}\left( {p_{1},q} \right)} \\ \vdots \\ {E_{1}\left( {p_{\eta},q} \right)} \\ {E_{2}\left( {p_{1},q} \right)} \\ \vdots \\ {E_{2}\left( {p_{\eta},q} \right)} \\ \vdots \\ {E_{n}\left( {p_{1},q} \right)} \\ \vdots \\ {E_{n}\left( {p_{\eta},q} \right)} \end{bmatrix}} & (17) \end{matrix}$

And the vector of dimensions 2*n*η:

With these positions, the safety constraint can be expressed by the inequality: E(p,q){dot over (q)}≤f(p,q)  (20)

At a certain moment in time, the current state of the robot is safe if the condition in the previous relationship is verified.

In relationship (20), E is a matrix of dimensions (2*n*η×n), where n is the number of joints of the robot and η is the number of points detected by the device that monitors the position of the operator. f is a vector of 2*n*η components. q is a vector with n components that identifies the configuration of the robot (like in the definition 3.5 of standard ISO 8373:2012), and thus contains the n angular positions of the joints. {dot over (q)} is a vector with n components that at each moment contains the time derivatives of the components of the vector q and thus the speeds of the joint coordinates. p is a vector of 3*η components that contains, for each of the η points detected on the operator, the 3 position coordinates. Such a vector can also contain the positions of such points, predicted at future moments.

If the obstacle is an operator, p contains the coordinates of some points detected on the body (for example: shoulders, head, elbow, hands).

The calculation of the matrix E and of the vector f thus requires knowledge of the coordinates q of the joints of the robot: they are available at all times by interrogating the controller of the robot. The calculation also requires knowledge of the coordinates p of the points detected on the operator. The ways in which the coordinates of such points are obtained is not relevant for the invention. On the market there are devices (depth cameras) that are able to return the information requested. The way in which the position of the points of the person is inserted in the calculation of the matrix E and the way in which it is possible to take into account the position taken up by such points in the following moments are described in detail in the aforementioned article [ICAR 2015].

The object of the invention concerns the use of some indices derived from such matrices to determine the best direction of motion for the robot.

In particular, the invention exploits the geometric structure of the aforementioned matrices, obtained from the Singular Value Decomposition (SVD): E=USV ^(T)  (21)

As known from the theory of singular value decomposition, U is an orthogonal square matrix of dimensions (2*n*η×2*n*η), S is a matrix of dimensions (2*n*η, n) containing the so-called singular values of the matrix E, V is an orthogonal square matrix of dimensions (n×n), V^(T) is the transposed matrix of V.

The matrix V contains an organized set of directions (orthonormal vectors) in the space of the joints (see the definition 4.7.4 of standard ISO 8373:2012) in which the robot is potentially more or less productive. Indeed, using ν_(i) to indicate the i-th column of the matrix V or of the matrix −V, a variable that can be easily determined is the maximum speed able to be obtained in such a direction, such as not to violate the safety requirement (20). For this reason, for each of the directions ν_(i), it is necessary to set up the optimization problem: φ_(i) ^(max)=max{φ}  (21) such that: φE(p,q)ν_(i) ≤f(p,q) |φν_(i) |≤{dot over (q)} _(max)  (22)

where {dot over (q)}_(max) is the vector of the maximum speeds that the single joint coordinates can assume and the second of the conditions (22) is taken element by element of the vectors involved.

For each of the directions ν_(i), in the space of the joints of the manipulator, it thus concerns determining the maximum intensity φ_(i) ^(max) of the speed φν_(i), so that such a speed respects the safety constraint and is element for element lower than the maximum allowed.

The value of the index i such that the corresponding value φ_(i) ^(max) is higher corresponds to the best direction (in the space of the joints) in which the robot can move, without having to slow down significantly its speed due to the presence of the human operator.

However, it is of greater interest to relate the productivity to the base coordinates system (see the definition 4.7.2 of standard ISO 8373:2012), rather than to the space of the joints. For this reason the Jacobian matrix J(q), of dimensions (3×n), is used, which links the linear speed of the characteristic point of the terminal member TCP (Tool Centre Point, definition 4.9 of standard ISO 8373:2012) to the speeds in the space of the joints, according to the relationship: ν_(TCP) =J(q){dot over (q)}  (23)

The speed φ_(i) ^(max)ν_(i) in the space of the joints will thus result in the following speed of the TCP: φ_(i) ^(max) J(q)ν_(i)  (24)

For each value of the index i, the Euclidean norm of the vector given in (24): ∥φ_(i) ^(max) J(q)ν_(i)  (25) represents the productivity index of the direction in the base coordinates system, identified by the unitary vector:

$\begin{matrix} \frac{\varphi_{i}^{\max}{J(q)}v_{i}}{{\varphi_{i}^{\max}{J(q)}v_{i}}} & (26) \end{matrix}$

Expressions (25) and (26) jointly represent a method for determining the direction in the base coordinates system in which the robot can move without danger of having to decrease its speed due to the presence of the human operator, maximizing productivity.

As an example, two possible ways of use of the directions of motion and of the productivity indices associated with them are given.

FIG. 5 shows a first way of use in which the robot 42, with a terminal member TCP, exploits one of the directions calculated to modify its original path, adding a fly-by point (definition 5.7 of standard ISO 8373:2012) before reaching its target 51 (Destination Station) starting from a starting station 52. In FIG. 5 it is possible to see the solid curved line 55, as a deviation with respect to the dashed straight line 56 that intercepts an operator 41. Of particular relevance is the description of the way in which the result of the operations shown in the flow diagram of FIG. 3, described hereinafter, can be used to determine the initiation point.

Using x to indicate the current position of the characteristic point of the terminal member TCP in the base coordinates calculated through forward kinematics (see the definition 4.1 of standard ISO 8373:2012), the initiation point can be calculated as: x+δT _(s)φ_(i) ^(max) J(q)ν_(i)  (27)

In (27) δ is a generic number comprised between 0 and 1, i.e., 0<δ<1, whereas T_(s) is the stop time, already introduced in (1). For its definition reference should be made to standard EN 60204-1 and in particular to the stop of category 1. The parameter δ can be used to determine how much the trajectory of the robot can depart from the predefined path. It is advantageous to select a high value (close to one) for such a value if the terminal member of the robot is sufficiently far from its target, and a lower value (close to zero, but still positive) when the robot is already close to the work station that it must reach. As an example, such a parameter can be selected as the cosine of the angle between the vector joining the current position of the robot and the corresponding target and the vector corresponding to the direction of productivity (26), multiplied by the corresponding productivity index (25) and by the stop time.

For the selection of the best fly-by point, the following is carried out:

-   -   (1) determine the optimal productivity directions that do not         take the robot away from its target;     -   (2) among these directions select the one associated with the         maximum value of the productivity index in (25), in the case of         more than one optimal direction, the first it taken arbitrarily.     -   (3) determine the value δ, for example as described earlier;     -   (4) temporarily interrupt the motion of the robot     -   (5) add a fly-by point calculated like in (27)     -   (6) update the journey towards the target point     -   (7) reset the motion of the robot.

A second example of use is given in FIG. 6. In particular, in this case it is possible for the terminal member TCP of the robot 42 to totally abandon the execution of the current task, which, starting from station 61, would involve approaching destination station #1, to carry out a certain operation, in favour of a new task to be carried out at the destination station #2. Dashed line 56 represents the path to destination station #1 while solid 57 represents the path to destination station #2. In this case, the directions determined in the method object of the present invention, together with the productivity indices defined previously, can be used to determine which station is easier to reach as a function of the safety constraints and from the current position of the operator detected with the points p. The directions of optimal productivity (26) and the relative indices (25) are used to determine the easiest target to reach among all of the possible alternatives. In particular calling the possible alternative targets x_(j):

-   -   (1) the direction of productivity (26) most similar to the         direction that joins the current position of the robot x to the         target x_(j) is determined;     -   (2) the estimated time to reach each target is determined as the         ratio between the distance between the current position x and         the target x_(j) and the corresponding productivity index;     -   (3) the target that minimizes such a value is selected.

With reference to FIG. 3 the operative flow diagram of the method object of the invention is now described.

After the operative start step, there is the setup of the algorithm and of the data structures (block 300). In particular, in the initialization step, the algorithm that implements the method object of the present invention reads from a suitable configuration file all the information relative to the kinematic structure of the robot (lengths of the links, see point 3.6 of standard ISO 8373:2012, and other kinematic parameters) and of the detection device of the points on the obstacle, hereinafter defined “sensor” (position and absolute orientation of the sensor with respect to the global coordinates reference system, etc.). Other relevant information concerns the mode of communication between the device that implements the method described here and the robot (protocol, TCP/IP port, IP address of the robot(s), etc.).

Then the configuration of the robot(s) (block 301) is read cyclically, with a suitable frequency, i.e., the linear/angular positions of each axis of motion, collected in the vector q, and their speeds (time derivatives of the above) {dot over (q)} are determined.

Then the position values of a (configurable) number η of points detected by the sensor on the operator are read, collecting their coordinates in the vector p. (block 302).

Then comes the calculation of the formula (20) expressed above, in other words the calculation of the matrix E(p,q) and of the vector f (p,q). (block 303).

Then the productivity indices are determined based on the matrix E(p,q) and on the vector f(p,q). (block 304).

In detail, this point is articulated in the following passages:

-   -   The Jacobian matrix J(q) of the terminal member TCP of the robot         (block 305) is calculated;     -   The singular value decomposition (SVD) of the matrix E is         calculated, obtaining the matrices U, S and V, like in (21)         (block 306);     -   The matrix V* containing the columns of the matrices V and −V         (block 307) is constructed;     -   For every column i of V* the corresponding φ_(i) ^(max) is         calculated solving the problem (21)-(22) (block 308);     -   For every column i of V* the directions of motion of the TCP and         the corresponding productivity indices are calculated according         to (25) and (26) (block 309).

Finally, the directions of motion and the productivity indices thus calculated are sent to the controller of the robot (block 310).

The operations of blocks 301-310 are carried out cyclically with a certain time period.

With reference to FIG. 4, a block diagram of the system in which the device object of the invention operates is shown in an operative condition.

As an example, the case is shown of a single operator 41 and of a single planar robot 42, comprising a terminal member TCP, for which four possible directions are highlighted, organized as a function of the corresponding productivity index. Four values #1-#4 are given, as a function of the direction of theoretical movement of the terminal member of the robot. It should be noted that the index of greatest value is the one that faces in the opposite direction to that of presence of the operator.

The device 44 object of the invention, which communicates bidirectionally with the controller 45 of the robot, comprises at least one vision system, for example depth cameras defined above, of the per se known type, adapted for cyclically determining the position data p (shoulders, elbow, hands, etc.) over time of the operator(s).

The device 44 also receives from the controller 45 the current position data of the robot q and calculates the speed thereof (comparing the current position with that at the immediately preceding moment). These data are updated cyclically.

These two pieces of information (current position and speed), together with the kinematic structure of the robot (which is supplied to the device in the installation/configuration step) are sufficient for the application of the method object of the invention described above.

As far as the use by the robot of the productivity indices, calculated in accordance with the present invention, is concerned, the controller of the robot can perform selection based on the following alternatives, highlighted with reference to FIGS. 7 and 8.

FIG. 7 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device object of the invention, in the case of execution of an alternative path to the pre-programmed one.

After the START step, it updates the robot configuration q (block 70).

Then, the reception of directions, productivity indices and path recalculation request take place (block 71).

Then the controller verifies whether an alternative path is possible (block 72).

If it is not possible, it controls the reduction of the speed of the robot, possibly to the point of completely stopping the motion thereof (block 73).

On the other hand, if it is possible, it passes to the execution of the alternative path (block 74).

More in particular it calculates all of the possible initiation points using directions and productivity indices received by the device of the invention (block 75). Then it selects the best initiation point coherently with the position to be reached (block 76). Then it interrupts the execution of the current path (block 77). Then it adds the coordinates of the initiation point to the current path (block 78). Then it reactivates the execution of the updated path (block 79).

The operations of blocks 70-79 are carried out cyclically.

FIG. 8 shows a flow diagram of the program that the controller of the robot can execute based on the results calculated by the device object of the invention, in the case of execution of a new path with alternative final position, possibly not known a priori, which is different from the pre-programmed path.

After the START step, the robot configuration q is updated (block 80).

Then the reception of directions, productivity indices and path recalculation request takes place (block 81).

Then the controller verifies whether an alternative final position, possibly not known a priori, is possible (block 82).

If it is not possible, it controls the reduction of the speed of the robot, possibly to the point of completely stopping the motion thereof (block 83).

On the other hand, if it is possible, it goes to the execution of the new path with alternative final position (block 84).

More in particular, it selects the best direction of productivity coherently with all of the possible final positions able to be reached (block 85). In other words it selects the productivity index proportional to the maximum speed at which the collaborative robot can proceed in that direction without having to slow down or stop.

Then it interrupts the execution of the current task (block 86). Then it executes the new movement towards the identified position (block 87).

The operations of blocks 80-87 are carried out cyclically.

Moreover, the controller can establish that no alternative path is possible, and it thus decides to slow down the robot to the point of stopping if necessary.

In the embodiments described above reference has been made to simplified variants of presence of a collaborative robot and a human operator. However, it is clear that the method and the device object of the invention are applicable to the more general case of presence of many collaborative robots and many operators.

The case of many human operators does not actually involve any modification to the method object of the invention, in the sense that in the set p of points belonging to the operator all of the points will be included belonging to all of the operators that the device will be able to detect in the work area of the robot, since all of the operators present in the area monitored by the device, together with the prediction of the motion of each one, will be considered as obstacles for each robot.

As far as the case of presence of many collaborative robots is concerned, every robot, taking into account all of the operators presents, will apply the method in object calculating its own productivity directions/indices, such as to give each robot, in an independent manner, the possibility to modify its own path.

Summarizing, the method object of the invention makes it possible to supply the controller(s) of the robot with a series of productivity indices and relative directions.

On the controller side of the robot it makes it possible to select among the following possibilities, which also depends on the type of activity that the robot must carry out, for example what type of movement its terminal member must carry out, and/or based on a criterion of profitability of the task to be carried out:

-   -   1) change task/target of the robot, with execution of a new path         with alternative final position, possibly not known a priori,         which is different from a pre-programmed final position;     -   2) avoiding the obstacle/operator by the terminal member, with         execution of an alternative direction of motion or path to a         pre-programmed direction;     -   3) slowing down and possibly stopping.

The choice among these possibilities, as described above, can be made through a priority mechanism. Whereas alternative 3) is always possible, 1) and 2) may not be usable in certain applications or at certain moments. For example, if for a certain task of the robot there is not an alternative target, only options 2) and 3) are applicable.

As priority mechanism, it is also possible to use profitability criteria of the task: if a task for the robot has a high added value for the production context in which it is inserted, then it is better to take it to its conclusion avoiding the obstacle like in point 2). If there is the possibility of interrupting the current task to undertake a more profitable one then 1) is better. The priority mechanism can be preset in the robot.

The method object of the present invention can be advantageously carried out at least in part through a computer program that comprises encoding means for performing one or more steps of the method, when this program is executed on a computer. Therefore, the scope of protection is meant to extend to said computer program and also to computer-readable means that comprise a recorded message, said computer-readable means comprising program encoding means for performing one or more steps of the method, when said program is executed on a computer.

Said computer program, described by the flow diagram of FIG. 3, can be written with any programming language. The programs executed by the controller of the robot, exemplified by the flow diagrams of FIGS. 7 and 8, can be written with a programming language known to those skilled in the art, for example RAPID, KRL, URscript, VAL, Karel.

Variant embodiments of the non-limiting example described are possible, without moreover departing from the scope of protection of the present invention, all comprising the equivalent embodiments for those skilled in the art.

The elements and the characteristics illustrated in the different preferred embodiments can be combined with each other without moreover departing from the scope of protection of the present invention.

The advantages deriving from the application of the present invention are clear.

The optimization of performance in terms of productivity of a collaborative robot, the decrease of the cycle time also in the presence of one or more human operators, greater (cognitive) decisional capability for the robot and the increase in safety perceived by the human operator are obtained.

By means of the present invention it is possible to interpret the intentions of the human operator, and to a certain extent predict the behaviour thereof, so as to prevent the robot from stopping. For this purpose, alternative strategies for executing the operations of the robot are provided that take into account information coming, for example, from vision sensors so as to ensure, at all times, optimal levels of productivity, not only for the robot(s), but for the entire work station (operators and robot).

From the description given above those skilled in the art can achieve the object of the invention without introducing further constructive details. In particular, by applying their knowledge, they will be able to make the programs that implement the functions of the method from only reading what has been described above. 

The invention claimed is:
 1. A method for controlling one or more collaborative robots, each one of said one or more collaborative robots being mounted on a fixed or movable base and being equipped with: one or more terminal members; a motion controller configured to move, along predetermined directions, said one or more terminal members based on a position of at least a human operator; wherein said method comprises the following iterative steps: determining position coordinates of said human operator; determining position coordinates of each one of said terminal members; for each terminal member determining, as a function of both said position coordinates of said terminal member and said position coordinates of said human operator, a plurality of productivity indices; each productivity index being associated with a respective one of said predetermined directions; each productivity index being indicative of a maximum speed at which a respective terminal member can move, in a respective one of said predetermined directions, at least in case of a presence of said human operator; supplying to said motion controller said productivity indices; activating said motion controller to move, along said predetermined directions, said one or more terminal members based on said productivity indices.
 2. The method according to claim 1, wherein each collaborative robot comprises at least a robotic manipulator provided with a number n of joints; each terminal member being coupled to a respective robotic manipulator; wherein: said determining position coordinates of each one of said terminal members comprises: cyclically reading a linear position or angular position of each joint of a respective robotic manipulator; collecting said linear positions or said angular positions of each joint in a position vector q having n components; and calculating a speed vector ^({dot over (q)}) as a function of said position vector q; said determining position coordinates of said human operator comprises: cyclically determining a number η of points detected on said human operator; and collecting said number η of points in an operator position vector p; said operator position vector p having 3*η components, corresponding to a three position coordinates of a respective point; said determining a plurality of productivity indices comprises: calculating a matrix E(p,q) and a vector f(p,q), wherein: E(p,q)is a matrix of 2*n*η×n size, calculated as a function of both said operator position vector p and said position vector q; f(p,q) is a vector of 2*n*η components; calculated as a function of both said operator position vector p and said position vector q; and determining said productivity indices as a function of said matrix E(p,q) and said vector f(p,q), wherein the relation E(p,q){dot over (q)}≤f (p,q) holds.
 3. The method according to claim 2, wherein said determining a plurality of productivity indices further comprises: calculating a singular value decomposition of said matrix E(p,q), obtaining matrices U, S and V; wherein: said matrix U is an orthogonal square matrix of (2*n*η×2*n*η) size; said matrix S is a matrix of (2*n*η, n) size containing singular values of said matrix E(p,q); said matrix V is an orthogonal square matrix of (n×n) size; each column i of said matrix V corresponding to a respective movement direction v_(i), in a joint coordinate system, of a respective terminal member; for each movement direction v_(i), calculating a respective value φ_(i) ^(max)=max{φ}, in the joint coordinate system, corresponding to a maximum intensity of a movement speed along a respective direction v_(i), wherein the relations: φE(p,q)ν_(i) ≤f(p,q) |φν_(i) |≤{dot over (q)} _(max) hold, {dot over (q)}_(max) being a vector of maximum speeds that a single joint coordinate can assume; for each movement direction v_(i), converting said value φ_(i) ^(max) from the joint coordinate system into a coordinate system based on said position coordinates of said respective terminal member; for each movement direction v_(i), calculating said productivity indices as a function of said value φ_(i) ^(max) in said coordinate system based on said position coordinates of said respective terminal member.
 4. The method according to claim 1, wherein said activating said motion controller to move said one or more terminal members based on said productivity indices further comprises one or more of the following: executing a direction of motion or path which is alternative to said predetermined direction; executing a new path with an alternative final position, possibly not known a priori, which is different than said predetermined movement final position; slowing down the motion of said robot; stopping the motion of said robot.
 5. The method according to claim 4, wherein said controller for controlling the motion of one or more robots decides to take said actions on the basis of a priority mechanism that depends on the type of activity that the robot must carry out and/or the type of movement that said terminal member must make and/or a criterion of profitability of the task to be carried out.
 6. A device for controlling the motion of one or more collaborative robots, wherein said device comprises means for implementing the method according to claim 1, said means comprising: at least one vision system adapted to cyclically determining said position coordinates of one or more human operators over time; means for determining said position coordinates of each one of said terminal members; and means for determining said set of productivity indices associated with respective directions of motion of the terminal member of the robot. 